home *** CD-ROM | disk | FTP | other *** search
/ System Booster / System Booster.iso / Texteditors / Xvi V1.0 / Amiga.doc < prev    next >
Text File  |  1996-09-26  |  13KB  |  367 lines

  1.  
  2.                        XVI AMIGA TEXT EDITOR
  3.                        _____________________
  4.  
  5.  
  6.            Amiga Conversion by Dan Schmelzer, October 1994
  7.  
  8.                      Generic Xvi Version: 2.15
  9.                        Amiga Xvi Version: 1.0
  10.  
  11.  
  12. This file documents the Amiga specific features of Xvi, a vi-like
  13. editor by Chris and John Downey.
  14.  
  15. ************************************************************************
  16. *  For copyright and distribution details consult file: COPYING.  The  *
  17. *  Amiga-specific executable code, source code, and auxiliary files    *
  18. *  are to be distributed along with the original sources for Xvi as    *
  19. *  specified in the "Xvi copying permission notice" (file COPYING).    *
  20. *  Please abide by these rules as we would like to allow everyone in   *
  21. *  the Amiga community access to this excellent editor by Chris and    *
  22. *  John Downey!                                                        *
  23. ************************************************************************
  24.  
  25.  
  26. The Amiga implementation of xvi has all of the basic features of the
  27. original xvi editor (version 2.15) plus some Amiga-specific features.
  28.  
  29. There are two versions of amiga xvi, one for Amiga OS V1.3 and one
  30. for Amiga OS V2.0 and later.  Although the OS V1.3 version will run
  31. under OS V2.0 it is highly recommended that you use the OS V2.0 version
  32. if possible since it handles certain features, such as requesters, in
  33. a better fashion.  Also, the OS V2.0 version has had more testing.
  34. The two versions share the same source code and are built into two
  35. different executables.
  36.  
  37. Xvi can be run on the Amiga system from either the CLI (Command Line
  38. Interface) or from the Workbench.  When run from the CLI it will take
  39. over the existing CLI window and rename it to "xvi ##x## window" where
  40. ##x## indicates the number of rows and columns being used.  You can
  41. specify any of the generic-xvi command line options when starting from
  42. the CLI.   When xvi is exited the window is returned to the original
  43. CLI shell and original title restored.
  44.  
  45. Xvi can be started from the Amiga Workbench in one of two ways.  Double
  46. clicking on the XVI icon will bring up xvi without editing a file (same
  47. as typing "xvi" in the CLI).  Selecting one or more data (text) files
  48. using shift-single click, and then shift-double clicking the XVI icon
  49. will start xvi editing those selected data files in the order they were
  50. initially clicked.  This is as if you had typed "xvi file1 file2 file3",
  51. for example, in the CLI.
  52.  
  53. Since the Amiga is a rather amazing graphical computer it seems only
  54. fitting that any good program, even a text editor, will take advantage
  55. of that.  The mouse can be used to position the cursor by clicking on
  56. the text where you wish the cursor to go.  Note that only locations on
  57. the screen that contain text can be the destination of the cursor.  If
  58. you click in a disallowed area the cursor will be placed as close as
  59. possible.  Also, you must be in "normal" mode within xvi for the cursor
  60. to respond.
  61.  
  62. Moving between different xvi-windows (vertically stacked areas in the
  63. Amiga window, one for each file being edited simultaneously) is easy by
  64. simply clicking the mouse in the desired xvi-window to move the cursor
  65. there.  See the generic xvi documentation for details of how to use
  66. xvi-windows.
  67.  
  68. Another rather nice feature is the ability to resize the Amiga window
  69. dynamically.  That is, you can change the size of your text display
  70. while editing a file and all will remain sane.  You can use the resize
  71. gadget at the lower right of the window or the alternate size gadget at
  72. the upper right of the window.
  73.  
  74. You can also terminate the xvi program by clicking on the close gadget
  75. at the upper left corner of the Amiga window.  If internal xvi buffers
  76. have not been saved (you have made changes to the file) and you try to
  77. terminate xvi this way a requestor will appear asking if you want to
  78. forget the changes and exit anyway, or return to the xvi program.  Note
  79. that if you are running xvi from a CLI clicking on the close gadget will
  80. only exit you from xvi, it will not close the CLI window.  If xvi was
  81. started from the Workbench the window will also disappear.
  82.  
  83. To determine which version of xvi you are running just use the :version
  84. or :ver command.  The generic xvi version will appear on the status line
  85. and the generic and Amiga xvi versions will also appear in a requestor.
  86.  
  87. Whether starting from the CLI or from the Workbench, certain global
  88. attributes of xvi can be altered to fit your preferences.  These are
  89. specified by the following global environment variables.  The first
  90. three are generic to xvi, the remaining are Amiga specific.
  91.  
  92. XVI GENERIC ENVIRONMENT VARIABLES:
  93.  
  94.   XVINIT       Xvi startup filename.
  95.   HOME         Directory where xvi ":cd" command sends you.
  96.   SHELL        Shell command that executes with xvi ":sh" command.
  97.  
  98. AMIGA-SPECIFIC ENVIRONMENT VARIABLES:
  99.  
  100.   XVISHSTART   Shell startup filename for use by SHELL.
  101.  
  102.   XVIFONT      Default font to use.  Only if the font has NOT been
  103.                overridden by the workbench tool type FONT is the
  104.                XVIFONT environment variable used.  If XVIFONT and FONT
  105.                tool type are not set the default Amiga system font will
  106.                be used by xvi.  The XVIFONT environment variable (or
  107.                FONT tool type) string must be of the following formats:
  108.                    [<font_path>]<font_name>.font,<size>
  109.                    [<font_path>]<font_name>.font <size>
  110.                For example:
  111.                    XVIFONT=Fonts:topaz.font,8
  112.                    XVIFONT=topaz.font 16
  113.  
  114.   XVIMAP_RET   If this environment variable exists map "\r" to "\r0" in
  115.                normal mode.  (This cannot be done via the map command.)
  116.  
  117. Set these environment variables in your Amiga "user-startup" file.
  118. (You will have to reboot to have them take effect.)  Following is an
  119. example of what you might want to add to your "user-startup" file:
  120.  
  121. ; For Xvi.
  122. path Work:Xvi_Editor add
  123. setenv XVINIT source Work:s/xvinit
  124. setenv HOME Program:
  125. setenv SHELL newshell WINDOW=CON:42/68/664/390/xvi_Shell/ALT5/265/145/27/CLOSE
  126. setenv XVISHSTART Work:s/xvi-shell-start
  127. setenv XVIMAP_RET 1
  128. setenv XVIFONT Font:topaz.font,8
  129. ; End of Xvi stuff.
  130.  
  131.  
  132. When started from the Amiga Workbench certain attributes of xvi can be
  133. altered on a session by session basis.  Normally the size of the Amiga
  134. window created when xvi is started from the Workbench is 25 rows by 80
  135. columns.  The size of the window and other attributes can be changed
  136. to suit your preferences.  In fact, you can have several copies of xvi,
  137. each with it's own specific attributes!
  138.  
  139. The Amiga version of xvi supports the following Amiga Tool Types:
  140.  
  141.   NAME       Alternate name for Amiga window title.  String specified by
  142.              "NAME" will replace "xvi" in the title "xvi ##x## window".
  143.  
  144.   ROWS       Number of text rows in the Amiga window.
  145.  
  146.   COLUMNS    Number of text columns (including xvi command/status line)
  147.              in the Amiga window.
  148.  
  149.   FONT       Font to use.
  150.  
  151.   PARMS      Generic xvi command line parameters.
  152.  
  153.   LEFT_EDGE  Number of pixels between left edge of the Amiga Workbench
  154.              screen and the left edge of the Amiga xvi window.  This is
  155.              an advanced feature and can cause the window to be not
  156.              displayable if the value is set too high.  A value of zero
  157.              is valid.
  158.  
  159.   TOP_EDGE   Number of pixels between top edge of the Amiga Workbench
  160.              screen and the top edge of the Amiga xvi window.  This is
  161.              an advanced feature and can cause the window to be not
  162.              displayable if the value is set too high.  A value of zero
  163.              is valid.
  164.  
  165.  
  166. Following is an example of how you might specify these Amiga Tool Types:
  167.  
  168.     ROWS=60
  169.     COLUMNS=132
  170.     FONT=topaz.font,8
  171.     PARMS=-s statuscolour=0057 -s nonumber
  172.     NAME=My Big Xvi
  173.  
  174. The Amiga version of xvi supports color (colour).  In addition you can
  175. change font style by using the "set colour", etc commands.  Note that
  176. you may have only the first four colors if you are running the standard
  177. 4-color Workbench.  The remaining four colors will probably be different
  178. on your system (assuming you are running an 8-color Workbench) than
  179. that shown below.
  180.  
  181. You can change the colors and styles of different parts of the xvi
  182. display by setting parameters "colour", "statuscolour", "roscolour",
  183. and "systemcolour".  See the generic xvi documentation for details
  184. of what each parameter controls.
  185.  
  186. The color/style number is the following Octal format:
  187.     0xyz
  188. where 
  189.     x is the Style:
  190.       0 = Plain Text
  191.       1 = Bold
  192.       2 = Color Off (use to remove any existing color/style)
  193.       3 = Italic
  194.       4 = Underline
  195.       7 = Inverse Video
  196.  
  197.     y is the Background Color:
  198.     z is the Foreground Color:
  199.       0 = Medium Grey     (default workbench color)
  200.       1 = Black           (default workbench color)
  201.       2 = White           (default workbench color)
  202.       3 = Dark Blue-grey  (default workbench color)
  203.       4 = Blue            (8-color workbench, user specific color)
  204.       5 = Lavender        (8-color workbench, user specific color)
  205.       6 = Teal            (8-color workbench, user specific color)
  206.       7 = Yellow          (8-color workbench, user specific color)
  207.  
  208. For example the following will give a Bold, White on Dark Blue-grey
  209. status line.  Note that you may have to do a screen refresh (cntl-L)
  210. if you are experimenting with setting the color/style from within xvi
  211. to get the new color/style to be displayed.
  212.  
  213.   set statuscolour=0132
  214.  
  215. Some color combinations give you some rather interesting, and sometimes
  216. useful effects.  Try the following.  It will give you Black text on
  217. White background but the background will remain Medium Grey (Amiga
  218. system default for background) in areas of the display not containing
  219. text.
  220.  
  221.   set colour=0021
  222.  
  223. Be careful not to set both foreground and background to the same color
  224. or you will not be able to read anything.  One last thing.  The color
  225. number shown when you do a "set" or "set all" command is in decimal, so
  226. don't be confused.
  227.  
  228.  
  229. The Amiga keyboard has a number of function keys and other special keys
  230. that you might wish to map to some xvi function.  The Amiga version of
  231. xvi detects the following function/special keys and generates an
  232. control sequence that you can remap using the xvi "map" command.  If
  233. you do not want to use a specific key it is best to map that key to
  234. something safe like CNTL-L (refresh the display).  
  235.  
  236.     KEY        CONTROL SEQUENCE
  237.     ----------    ----------------
  238.     Del        CNTL-?
  239.  
  240.     F1        CNTL-A P
  241.     F2        CNTL-A Q
  242.     F3        CNTL-A R
  243.     F4        CNTL-A S
  244.     F5        CNTL-A T
  245.     F6        CNTL-A U
  246.     F7        CNTL-A V
  247.     F8        CNTL-A W
  248.     F9        CNTL-A X
  249.     F10        CNTL-A Y
  250.  
  251.     Shift-F1    CNTL-A p
  252.     Shift-F2    CNTL-A q
  253.     Shift-F3    CNTL-A r
  254.     Shift-F4    CNTL-A s
  255.     Shift-F5    CNTL-A t
  256.     Shift-F6    CNTL-A u
  257.     Shift-F7    CNTL-A v
  258.     Shift-F8    CNTL-A w
  259.     Shift-F9    CNTL-A x
  260.     Shift-F10    CNTL-A y
  261.  
  262.     Up Arrow    CNTL-A A
  263.     Down Arrow    CNTL-A B
  264.     Right Arrow    CNTL-A C
  265.     Left Arrow    CNTL-A D
  266.  
  267.     Shift-Up Arrow    CNTL-A a
  268.     Shift-Down Arrow    CNTL-A b
  269.     Shift-Right Arrow    CNTL-A c
  270.     Shift-Left Arrow    CNTL-A d
  271.  
  272.  
  273. The XVINIT environment variable determines the startup file for xvi.
  274. If you want all of your xvi sessions to have certain attributes it is
  275. best to set those attributes in the startup file.  Note that any command
  276. line parameter (or Workbench PARMS tool type) will override these
  277. settings.
  278.  
  279. Following is an example of what you might have in your XVINIT file.
  280. Note that '^?', '^A', '^L', etc represent single control characters in
  281. the file and must be entered as control characters (using cntl-V).
  282.  
  283. "================================================================
  284. " xvinit file for xvi (Public Domain vi)
  285. " Revised Date: 10/27/94
  286. "
  287. set noshowmatch nowrapscan magic number noremap
  288. set autosplit=1
  289. set report=1
  290. set helpfile=Work:Xvi_Editor/xvi.help
  291. " Make status line yellow text on dark blue background.
  292. set statuscolour=0037
  293. "
  294. "---Key Mapping-------------------------------------------------
  295. "
  296. " Del
  297. map ^? x
  298. "
  299. " Turn off function keys by mapping them to control-L
  300. " F1
  301. map ^AP 
  302. " F2
  303. map ^AQ 
  304. " F3
  305. map ^AR 
  306. " F4
  307. map ^AS 
  308. " F5
  309. map ^AT 
  310. " F6
  311. map ^AU 
  312. " F7
  313. map ^AV 
  314. " F8
  315. map ^AW 
  316. " F9
  317. map ^AX 
  318. " F10
  319. map ^AY 
  320. "
  321. " Shifted F1
  322. map ^Ap 
  323. " Shifted F2
  324. map ^Aq 
  325. " Shifted F3
  326. map ^Ar 
  327. " Shifted F4
  328. map ^As 
  329. " Shifted F5
  330. map ^At 
  331. " Shifted F6
  332. map ^Au 
  333. " Shifted F7
  334. map ^Av 
  335. " Shifted F8
  336. map ^Aw 
  337. " Shifted F9
  338. map ^Ax 
  339. " Shifted F10
  340. map ^Ay 
  341. "
  342. " Up Arrow
  343. map ^AA k
  344. " Down Arrow
  345. map ^AB j
  346. " Right Arrow
  347. map ^AC l
  348. " Left Arrow
  349. map ^AD h
  350. "
  351. " Shifted Up Arrow -> Page up
  352. map ^Aa 
  353. " Shifted Down Arrow -> Page down
  354. map ^Ab 
  355. " Shifted Right Arrow -> Cursor to right end of line
  356. map ^Ac $
  357. " Shifted Left Arrow -> Cursor to left end of line
  358. map ^Ad 0
  359. "
  360. " End of xvinit file.
  361.  
  362.  
  363. Have fun with xvi for the Amiga!!!
  364. -- Dan Schmelzer
  365.  
  366. End of document_________________________________________________________
  367.